var express = require('express');
var router = express.Router();
var urlUtil = require("../utils/httpUtil.js");

router.get('/', function (req, res, next) {
    if (req.session.user) {
        let order_list_url = 'http://10.222.29.198:3000/api/order/list/' + req.session.user._id;
        urlUtil.getPostContent(order_list_url, {id: req.session.user._id}, function (data) {
            console.log('[获取order数据]');
            console.log(data);
            res.send(data);
        })
    }
});
module.exports = router;